import 'dart:async';

import 'package:bloc_usage/bloc/Bloc.dart';
import 'package:flutter/material.dart';

class CountBloc extends Bloc {
  int _count = 0;
  var _countController = StreamController<int>.broadcast();

  void increment() => _countController.add(++_count);

  get stream => _countController.stream;

  get value => _count;

  @override
  void release() {
    _countController.close();
  }
}

class CounterNotif with ChangeNotifier {}

CountBloc countBloc = CountBloc();
